
<template>
  <el-image
      v-if="imgUrl"
      style="width: 80px; height: 50px"
      :src="imgUrl"
      :zoom-rate="1.2"
      :max-scale="7"
      :min-scale="0.2"
      :preview-src-list="[imgUrl]"
      :initial-index="0"
      :preview-teleported="true"
  />
</template>
<script setup>
import {onMounted, ref, watch} from 'vue'
const props = defineProps({ scope: {
  default: ''
} })
const imgUrl = ref('')
watch(() => { return props.scope.imageUrl }, () => {
  // 数据变化之后的回调函数
  imgUrl.value = props.scope.imageUrl
}, { immediate: true, deep: false })

onMounted(() => {

})
</script>

<style scoped>
</style>
